package com.frxuexi.apps

import com.frxuexi.apps.entity.AppsData
import com.frxuexi.lib_base.ApiResp
import com.frxuexi.lib_base.BaseRepository
import com.frxuexi.lib_http.HttpType
import com.frxuexi.lib_http.NetworkFactory
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

@OptIn
class AppsRepository @Inject constructor():BaseRepository() {
    val apiService by lazy { NetworkFactory.factory(HttpType.NONE).create(ApiService::class.java) }

    fun getApps(map: Map<String,Int>):Flow<ApiResp<List<AppsData>>>{
        return apiService.getApps(mapToBody(map))
    }
}